import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {VideolistComponent} from './videolist/videolist.component';
import {VideoaddComponent} from './videoadd/videoadd.component';
import {VideotypelistComponent} from './videotypelist/videotypelist.component';
import {VideotabaddComponent} from './videotabadd/videotabadd.component';

const routes: Routes = [
    {
        path: '',
        redirectTo: 'list',
        pathMatch: 'full'
    },
    {
        path: 'list',
        component: VideolistComponent
    }, {
        path: 'add',
        component: VideoaddComponent
    },
    {
        path: 'add/:id',
        component: VideoaddComponent
    },
    {
        path: 'type',
        component: VideotypelistComponent
    }, {
        path: 'typeadd',
        component: VideotabaddComponent
    }, {
        path: 'typeadd/:id',
        component: VideotabaddComponent,
    }
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class VideoRoutingModule {
}
